home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////
- // MonthChoice
- // by Charles Lloyd
- ////////////////////////
-
-
- id matrixName;
- id selectedMonth;
- id selectedMonthInt;
- id borderSize;
- id cellPadding;
- id cellSpacing;
-
- id monthChoices1;
- id monthChoices2;
- id monthChoices3;
- id monthTable;
-
- - awake
- {
- matrixName = @"UserShouldProvide";
- [self setSelectedMonthInt:[[NSCalendarDate date] monthOfYear]];
- borderSize = 1;
-
- monthChoices1 = @("Jan", "Apr", "Jul", "Oct");
- monthChoices2 = @("Feb", "May", "Aug", "Nov");
- monthChoices3 = @("Mar", "Jun", "Sep", "Dec");
-
- monthTable = @("Invalid", "Jan", "Feb", "Mar", "Apr", "May",
- "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
- cellPadding = 1;
- cellSpacing = 0;
- }
-
- - setSelectedMonth:aMonthString
- {
- selectedMonth = aMonthString;
- selectedMonthInt = [monthTable indexOfObject:aMonthString];
- }
-
- - setSelectedMonthInt:anInt
- {
- selectedMonthInt = anInt;
- selectedMonth = [monthTable objectAtIndex:anInt];
- }
-